﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace Bll
{
    public class Link
    {
        /// <summary>
        /// 查询声明列表
        /// </summary>
        /// <returns></returns>
        public static DataTable MULTIPLE(string strCon)
        {
            return Dal.Link.MULTIPLE(strCon);
        }

        public static DataTable Single(string strCon, int pkid)
        {
            return Dal.Link.Single(strCon, pkid);
        }

        public static DataTable Single(string strCon, string urlname)
        {
            return Dal.Link.Single(strCon, urlname);
        }

        public static int Insert(string strCon,
                string txbLinkTitle,
                string txbLinkURL,
                int txbSortBy)
        {
            return Dal.Link.Insert(
                    strCon,
                    txbLinkTitle,
                    txbLinkURL,
                    txbSortBy
            );
        }

        public static int Update(string strCon,
                string txbLinkTitle,
                string txbLinkURL,
                int txbSortBy,
                int txbPKID)
        {
            return Dal.Link.Update(
                    strCon,
                    txbLinkTitle,
                    txbLinkURL,
                    txbSortBy,
                    txbPKID
            );
        }

        //public static int UpdateField(string strCon, int pkid, string fieldName, int fieldValue)
        //{
        //    return Dal.Link.UpdateField(pkid, fieldName, fieldValue);
        //}

        public static int Delete(string strCon, int pkid)
        {
            return Dal.Link.Delete(strCon, pkid);
        }
    }
}
